#ifndef MF_GRAPHICS_H
#define MF_GRAPHICS_H

#import "mfConstants.h"
#import "mfAppRunner.h"

#define MAX_CIRC_RESOLUTION 200

// static
static int		cornerMode			= OF_RECTMODE_CORNER;

// view & distortion
void ofSetupScreen();
void ofClearBackground();

// background options
void ofSetBackgroundAuto(bool bAuto);
bool ofbClearBg();
float * ofBgColorPtr();
void ofBackground(int r, int g, int b); // 0-255


// color options
void ofSetColor(int r, int g, int b); // 0-255
void ofSetColor(int r, int g, int b, int a); // 0-255
void ofSetColorHSB(int h, int s, int b); // 0-255
void ofSetColorHSB(int h, int s, int b, int a); // 0-255
void ofSetColor(int hexColor); // hex, like web 0xFF0033;


// drawing options
void ofNoFill();
void ofFill();


// rectangle drawing mode options
void ofSetRectMode(int mode);	// set the mode, either to OF_RECTMODE_CORNER or OF_RECTMODE_CENTER
int ofGetRectMode();			// default is OF_RECTMODE_CORNER


// transparency
void ofEnableAlphaBlending();  // this just turns on and off opengl blending, the common mode
void ofDisableAlphaBlending();


// shapes
void ofTriangle(float x1,float y1,float x2,float y2,float x3, float y3);
void ofRect(float x1,float y1,float w,float h);
void ofLine(float x1,float y1,float x2,float y2);
void ofCircle(float x,float y, float radius);
void ofEllipse(float x, float y, float width, float height);
void ofSetCircleResolution(int res);  		// if there 22 is a problem, you can change it here

void ofBeginShape();
void ofVertex(float x, float y);
// TODO: add ofCurveVertex and ofBezierVertex
void ofEndShape(GLint glDrawMode=-1); // note the difference from the OF version

void ofCurve(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3);
void ofBezier(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3);

// TODO: add mfSetCurveResolution (or should we set rez dynamically by arclength?)

#endif